<?php require_once('header.php');?>
 <script type='text/javascript' src="<?php echo base_url();?>sknimg/js/jquery-1.4.2.js"></script>
 <link rel="shortcut icon" type="image/x-icon" href="<?php echo base_url();?>sknimg/img/isee.ico" />
 <link href="<?php echo base_url();?>sknimg/css/userarea.css" rel="stylesheet" type="text/css" />
	<script type='text/javascript'>
		function setReadMentioned(mentioned_id){
			$.ajax({
				type: "POST",
				url: "<?php echo base_url()?>engine/readNotif/mentioned/"+mentioned_id,
				success: function(msg){
				}
			});
		}
		function setReadCommented(commented_id){
			$.ajax({
				type: "POST",
				url: "<?php echo base_url()?>engine/readNotif/commented/"+commented_id,
				success: function(msg){
				}
			});
		}

		function setIgnoreFriend(req_id){
			$.ajax({
				type: "POST",
				url: "<?php echo base_url()?>engine/readNotif/friendIgnore/"+req_id,
				success: function(msg){
					$('#decIgnore').hide();
					$('#decConfirm').hide();
					$('#ignored').show();
				}
			});
		}

		function setConfirmFriend(req_id,friend_id,user_id){
			$.ajax({
				type: "POST",
				url: "<?php echo base_url()?>engine/readNotif/friendConfirm/"+req_id+"/"+user_id+"/"+friend_id,
				success: function(msg){
					$('#decIgnore').hide();
					$('#decConfirm').hide();
					$('#confirmed').show();
				}
			});
		}
	</script>
</head>
<body>
<div id="wraper">
			<?php require_once('include/headeruser.php');?>
			<div class="skin">
				<div id="content">
					<div class="namauser"></a><a href="<?php echo base_url()?>profile/info"><?php echo $nama?></a></div>
					<div class="leftdas">
						<div class="leftdas2">
							<ul>
								<li><a href='<?php echo base_url()?>dashboard/'>My Echo </a></li>
								<li><a href='<?php echo base_url()?>dashboard/publicEcho'>Public Echo </a></li>
								<li><a href='<?php echo base_url()?>dashboard/friendEcho'>Friend Echo </a></li>
								<li><a href='<?php echo base_url()?>notifikasi'>Notifikasi </a></li>
							</ul>
						</div>
					</div>
					
					<div class="rightdas">
					<div class="notif">
					Mentioned
					<ul>
						<?php if($allNotifMentionedUnread){?>
							<?php for($i=0;$i<sizeOf($mentionedUnread_post_id);$i++){?>
								<li>
									Anda disebut oleh
									<a href="<?php echo base_url()?>profile/info/<?php echo $mentionedUnread_mentioner_username[$i]?>"><?php echo $mentionedUnread_mentioner_name[$i]?></a>
									dalam sebuah 
									<a href="<?php echo base_url()?>post/view/<?php echo $mentionedUnread_post_id[$i]?>" onClick="setReadMentioned('<?php echo $mentionedUnread_id[$i]?>')">Echo</a> (Unread)
								</li>
							<?php }?>
						<?php }?>
						<?php if($allNotifMentionedRead){?>
							<?php for($i=0;$i<sizeOf($mentionedRead_post_id);$i++){?>
								<li>
									Anda disebut oleh
									<a href="<?php echo base_url()?>profile/info/<?php echo $mentionedRead_mentioner_username[$i]?>"><?php echo $mentionedRead_mentioner_name[$i]?></a>
									dalam sebuah 
									<a href="<?php echo base_url()?>post/view/<?php echo $mentionedRead_post_id[$i]?>">Echo</a> (Read)
								</li>
							<?php }?>
						<?php }?>	
						</ul>
						
						Commented
						<ul>
						<?php if($allNotifCommented){?>
							<?php for($i=0;$i<sizeOf($commented_post_id);$i++){?>
								<li>
									Komentar oleh
									<a href="<?php echo base_url()?>profile/info/<?php echo $commented_commenter_username[$i]?>"><?php echo $commented_commenter_name[$i]?></a>
									dalam sebuah 
									<a href="<?php echo base_url()?>post/view/<?php echo $commented_post_id[$i]?>" target="blank"<?php if($read[$i]==0){?>onClick="setReadCommented('<?php echo $commented_id[$i]?>')"<?php }?>>Echo</a><?php if($read[$i]==0){?>(Unread)<?php }else{?>(read)<?php }?>
								</li>
							<?php }?>
						<?php }?>
						</ul>
						
						Friend Request
						<ul>
						<?php if($allNotifFriend){?>
							<?php for($i=0;$i<sizeOf($friend_requester_id);$i++){?>
								<li>
									<a href="<?php echo base_url()?>profile/info/<?php echo $friend_requester_username[$i]?>"><?php echo $friend_requester_name[$i]?></a>
									Mengirimkan permintaan pertemanan kepada anda
									<br>
									
									<a style="color:red;display:none;" id="ignored" href="javascript:;" >Sudah diabaikan</a>
									<a style="color:green;display:none;" id="confirmed" href="javascript:;">Sudah Berteman</a>
									
									<a style="color:red" id="decIgnore" href="javascript:;" onClick="setIgnoreFriend('<?php echo $friend_req_id[$i]?>')">Abaikan</a>
									&nbsp;&nbsp;&nbsp;&nbsp;
									
									<a style="color:green" id="decConfirm" href="javascript:;" onClick="setConfirmFriend('<?php echo $friend_req_id[$i]?>','<?php echo $friend_requester_id[$i]?>','<?php echo $this->session->userdata('userId')?>')">Setuju</a>
								</li>
							<?php }?>
						<?php }?>
						</ul>
					</div>
					
							
								
					</div>
					<div class="cl